package com.mxchen.lottery.domain.strategy.service.draw;

import com.mxchen.lottery.domain.strategy.StrategyGateway;
import com.mxchen.lottery.domain.strategy.model.AwardDetails;
import com.mxchen.lottery.domain.strategy.model.StrategyDetails;

import javax.annotation.Resource;

/**
 * TODO
 * 抽奖策略数据支撑，一些通用的数据服务
 * @author hmxchen
 */
public class DrawStrategySupport extends DrawConfig{
    @Resource
    protected StrategyGateway strategyGateway;

    /**
     * 查询策略配置信息
     *
     * @param strategyId 策略ID
     * @return 策略配置信息
     */
    protected StrategyDetails queryStrategyRich(Long strategyId){
        return strategyGateway.queryStrategyRich(strategyId);
    }

    /**
     * 查询奖品详情信息
     *
     * @param awardId 奖品ID
     * @return 中奖详情
     */
    protected AwardDetails queryAwardInfoByAwardId(String awardId){
        return strategyGateway.queryAwardInfo(awardId);
    }
}
